﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities;

namespace WorkflowConsoleApplication1
{

    public sealed class Multiply : NativeActivity<int>
    {
        public InArgument<int> Number1 { get; set; }
        public InArgument<int> Number2 { get; set; }
        public OutArgument<int> Output { get; set; }

        Variable<int> v_Number1 = new Variable<int>();
        Variable<int> v_Number2 = new Variable<int>();

        protected override void Execute(NativeActivityContext context)
        {
            v_Number1.Set(context, context.GetValue<int>(Number1));
            v_Number2.Set(context, context.GetValue<int>(Number2));

            Output.Set(context, v_Number1.Get(context) * v_Number2.Get(context));

            Console.Write(Output.ToString());
        }
    }

    
}
